package com.cdxy.model.dto.req;

import com.cdxy.model.info.OrderInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * @Author: tangy
 * @Date: 2020/4/7 16:36
 */
@Data
@ApiModel
public class SceneOrderReq extends UserWithLoginReq implements Serializable {

    @ApiModelProperty(value = "景点门票id")
    @NotNull(message = "门票不能为空")
    private List<OrderInfo> orderInfoList;

    @ApiModelProperty(value = "预定时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "预定时间不能为空")
    private LocalDate bookTime;

    @ApiModelProperty(value = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "电话不能为空")
    private String phone;

    @ApiModelProperty(value = "身份证号")
    @NotBlank(message = "身份证不能为空")
    private String idCard;
}
